<?php
include("config.php");
$dbLink	= mysql_connect ($sServer, $sUserName, $sPassword) or die("数据库Connect错误");
mysql_select_db ($sDBname, $dbLink) or die("数据库Select错误");

$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$icq = $_REQUEST['icq'];
$address = $_REQUEST['address'];
if (!isset($name))
{
	echo "请输入参数name!";
	return;
}
$sSQL = "update friends set telephone='$phone', icq='$icq',address='$address' where name='$name'";
$result = mysql_query($sSQL, $dbLink);
if ($result == TURE)
{
	header('Location:list.php');
}
else
{	
	echo "修改失败！";
}
?>
